﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SqlSugar;

namespace DAL.Helper
{
    class SqlSugarHelper
    {
        private static string ConnectionString = "Data Source=DESKTOP-M8LSRLI\\SQLEXPRESS;Initial Catalog=HsbServer;Integrated Security=True";
        public static SqlSugarClient getConnection()
        {
            SqlSugarClient client = new SqlSugarClient(new ConnectionConfig()
            {
                ConnectionString = ConnectionString,
                DbType = DbType.SqlServer,
                IsAutoCloseConnection = true//手动释放  是长连接 
            });
            return client;
        }
    }
}
